(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
ISNAT(n__length(L)) → ISNATLIST(activate(L))
ISNAT(n__length(L)) → ACTIVATE(L)
ISNATILIST(n__cons(N, IL)) → AND(isNat(activate(N)), isNatIList(activate(IL)))
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__cons(N, L)) → AND(isNat(activate(N)), isNatList(activate(L)))
ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → AND(isNat(activate(N)), isNatIList(activate(IL)))
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
ZEROSCONS(0, n__zeros)
ZEROS01
TAKE(0, IL) → UTAKE1(isNatIList(IL))
TAKE(0, IL) → ISNATILIST(IL)
UTAKE1(tt) → NIL
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
TAKE(s(M), cons(N, IL)) → AND(isNat(M), and(isNat(N), isNatIList(activate(IL))))
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → AND(isNat(N), isNatIList(activate(IL)))
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
UTAKE2(tt, M, N, IL) → CONS(activate(N), n__take(activate(M), activate(IL)))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))
LENGTH(cons(N, L)) → AND(isNat(N), isNatList(activate(L)))
LENGTH(cons(N, L)) → ISNAT(N)
LENGTH(cons(N, L)) → ISNATLIST(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ULENGTH(tt, L) → S(length(activate(L)))
ULENGTH(tt, L) → LENGTH(activate(L))
ULENGTH(tt, L) → ACTIVATE(L)
ACTIVATE(n__0) → 01
ACTIVATE(n__s(X)) → S(X)
ACTIVATE(n__length(X)) → LENGTH(X)
ACTIVATE(n__zeros) → ZEROS
ACTIVATE(n__cons(X1, X2)) → CONS(X1, X2)
ACTIVATE(n__nil) → NIL
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 17 less nodes.

(4) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
ACTIVATE(n__length(X)) → LENGTH(X)
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))
ULENGTH(tt, L) → LENGTH(activate(L))
LENGTH(cons(N, L)) → ISNAT(N)
ISNAT(n__length(L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
TAKE(0, IL) → ISNATILIST(IL)
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNAT(n__length(L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)
LENGTH(cons(N, L)) → ISNATLIST(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ULENGTH(tt, L) → ACTIVATE(L)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(5) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__length(X)) → LENGTH(X)
LENGTH(cons(N, L)) → ISNAT(N)
ISNAT(n__length(L)) → ISNATLIST(activate(L))
ISNAT(n__length(L)) → ACTIVATE(L)
LENGTH(cons(N, L)) → ISNATLIST(activate(L))
LENGTH(cons(N, L)) → ACTIVATE(L)
ULENGTH(tt, L) → ACTIVATE(L)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ISNAT(x1) ) = x1


POL( ISNATILIST(x1) ) = 2x1


POL( ISNATLIST(x1) ) = 2x1


POL( LENGTH(x1) ) = 2x1 + 1


POL( ULENGTH(x1, x2) ) = 2x2 + 1


POL( UTAKE2(x1, ..., x4) ) = 2x2 + 2x3 + 2x4


POL( and(x1, x2) ) = 2x2


POL( cons(x1, x2) ) = 2x1 + x2


POL( isNat(x1) ) = max{0, -2}


POL( isNatList(x1) ) = max{0, -1}


POL( uLength(x1, x2) ) = 2x2 + 2


POL( uTake2(x1, ..., x4) ) = 2x2 + 2x3 + 2x4


POL( isNatIList(x1) ) = max{0, -2}


POL( n__take(x1, x2) ) = 2x1 + 2x2


POL( length(x1) ) = 2x1 + 2


POL( s(x1) ) = x1


POL( activate(x1) ) = x1


POL( n__0 ) = 0


POL( 0 ) = 0


POL( n__s(x1) ) = x1


POL( n__length(x1) ) = 2x1 + 2


POL( n__zeros ) = 0


POL( zeros ) = 0


POL( n__cons(x1, x2) ) = 2x1 + x2


POL( n__nil ) = 0


POL( nil ) = 0


POL( take(x1, x2) ) = 2x1 + 2x2


POL( tt ) = 0


POL( uTake1(x1) ) = max{0, -2}


POL( ACTIVATE(x1) ) = x1


POL( TAKE(x1, x2) ) = 2x1 + 2x2



The following usable rules [FROCOS05] were oriented:

activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
length(X) → n__length(X)
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
take(X1, X2) → n__take(X1, X2)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
0n__0
niln__nil

(6) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))
ULENGTH(tt, L) → LENGTH(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
TAKE(0, IL) → ISNATILIST(IL)
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(8) Complex Obligation (AND)

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ULENGTH(tt, L) → LENGTH(activate(L))
LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ULENGTH(tt, L) → LENGTH(activate(L))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(ULENGTH(x1, x2)) = -I + 0A·x1 + 1A·x2

POL(tt) = 3A

POL(LENGTH(x1)) = 2A + 0A·x1

POL(activate(x1)) = 1A + 0A·x1

POL(cons(x1, x2)) = 0A + -I·x1 + 1A·x2

POL(and(x1, x2)) = -I + -I·x1 + 0A·x2

POL(isNat(x1)) = 3A + 1A·x1

POL(isNatList(x1)) = 2A + 1A·x1

POL(n__0) = 0A

POL(0) = 0A

POL(n__s(x1)) = 3A + 1A·x1

POL(s(x1)) = 3A + 1A·x1

POL(n__length(x1)) = 2A + 0A·x1

POL(length(x1)) = 2A + 0A·x1

POL(n__zeros) = 0A

POL(zeros) = 1A

POL(n__cons(x1, x2)) = -I + -I·x1 + 1A·x2

POL(n__nil) = 2A

POL(nil) = 2A

POL(n__take(x1, x2)) = 2A + 0A·x1 + 0A·x2

POL(take(x1, x2)) = 2A + 0A·x1 + 0A·x2

POL(isNatIList(x1)) = 3A + 1A·x1

POL(uLength(x1, x2)) = 0A + 0A·x1 + 1A·x2

POL(uTake1(x1)) = 2A + -I·x1

POL(uTake2(x1, x2, x3, x4)) = 3A + -I·x1 + 1A·x2 + -I·x3 + 1A·x4

The following usable rules [FROCOS05] were oriented:

activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
and(tt, T) → T
length(X) → n__length(X)
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
take(X1, X2) → n__take(X1, X2)
take(0, IL) → uTake1(isNatIList(IL))
isNatIList(n__zeros) → tt
uTake1(tt) → nil
isNatIList(IL) → isNatList(activate(IL))
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
0n__0
niln__nil

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LENGTH(cons(N, L)) → ULENGTH(and(isNat(N), isNatList(activate(L))), activate(L))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(13) TRUE

(14) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
TAKE(0, IL) → ISNATILIST(IL)
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(IL) → ACTIVATE(IL)
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__take(X1, X2)) → TAKE(X1, X2)
ISNATLIST(n__take(N, IL)) → ISNAT(activate(N))
ISNATLIST(n__take(N, IL)) → ACTIVATE(N)
ISNATLIST(n__take(N, IL)) → ISNATILIST(activate(IL))
ISNATLIST(n__take(N, IL)) → ACTIVATE(IL)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ISNAT(x1) ) = 2x1 + 2


POL( ISNATILIST(x1) ) = 2x1 + 2


POL( ISNATLIST(x1) ) = 2x1 + 2


POL( UTAKE2(x1, ..., x4) ) = 2x2 + 2x3 + 2x4 + 2


POL( and(x1, x2) ) = 2x2


POL( cons(x1, x2) ) = 2x1 + x2


POL( isNat(x1) ) = 2


POL( isNatList(x1) ) = max{0, -2}


POL( uLength(x1, x2) ) = max{0, -1}


POL( uTake2(x1, ..., x4) ) = x1 + 2x2 + 2x3 + 2x4 + 1


POL( isNatIList(x1) ) = max{0, -2}


POL( n__take(x1, x2) ) = 2x1 + 2x2 + 1


POL( length(x1) ) = 0


POL( s(x1) ) = 2x1


POL( activate(x1) ) = x1


POL( n__0 ) = 0


POL( 0 ) = 0


POL( n__s(x1) ) = 2x1


POL( n__length(x1) ) = max{0, -2}


POL( n__zeros ) = 0


POL( zeros ) = 0


POL( n__cons(x1, x2) ) = 2x1 + x2


POL( n__nil ) = 0


POL( nil ) = 0


POL( take(x1, x2) ) = 2x1 + 2x2 + 1


POL( tt ) = 0


POL( uTake1(x1) ) = 1


POL( ACTIVATE(x1) ) = 2x1 + 2


POL( TAKE(x1, x2) ) = 2x1 + 2x2 + 2



The following usable rules [FROCOS05] were oriented:

activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(IL) → isNatList(activate(IL))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
and(tt, T) → T
length(X) → n__length(X)
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
isNatList(n__nil) → tt
take(X1, X2) → n__take(X1, X2)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
0n__0
niln__nil

(16) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNAT(n__s(N)) → ISNAT(activate(N))
ISNAT(n__s(N)) → ACTIVATE(N)
TAKE(0, IL) → ISNATILIST(IL)
ISNATILIST(IL) → ISNATLIST(activate(IL))
ISNATLIST(n__cons(N, L)) → ISNAT(activate(N))
ISNATLIST(n__cons(N, L)) → ACTIVATE(N)
ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))
ISNATLIST(n__cons(N, L)) → ACTIVATE(L)
ISNATILIST(IL) → ACTIVATE(IL)
ISNATILIST(n__cons(N, IL)) → ISNAT(activate(N))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(N)
ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))
ISNATILIST(n__cons(N, IL)) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → UTAKE2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
UTAKE2(tt, M, N, IL) → ACTIVATE(N)
UTAKE2(tt, M, N, IL) → ACTIVATE(M)
UTAKE2(tt, M, N, IL) → ACTIVATE(IL)
TAKE(s(M), cons(N, IL)) → ISNAT(M)
TAKE(s(M), cons(N, IL)) → ISNAT(N)
TAKE(s(M), cons(N, IL)) → ISNATILIST(activate(IL))
TAKE(s(M), cons(N, IL)) → ACTIVATE(IL)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(17) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 3 SCCs with 18 less nodes.

(18) Complex Obligation (AND)

(19) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNAT(n__s(N)) → ISNAT(activate(N))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(20) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ISNAT(n__s(N)) → ISNAT(activate(N))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO] with arctic natural numbers [ARCTIC]:

POL(ISNAT(x1)) = -I + 0A·x1

POL(n__s(x1)) = 2A + 1A·x1

POL(activate(x1)) = 1A + 0A·x1

POL(n__0) = 1A

POL(0) = 1A

POL(s(x1)) = 2A + 1A·x1

POL(n__length(x1)) = 2A + 0A·x1

POL(length(x1)) = 2A + 0A·x1

POL(n__zeros) = 0A

POL(zeros) = 1A

POL(n__cons(x1, x2)) = 1A + 0A·x1 + 1A·x2

POL(cons(x1, x2)) = 1A + 0A·x1 + 1A·x2

POL(n__nil) = 2A

POL(nil) = 2A

POL(n__take(x1, x2)) = 2A + 1A·x1 + 0A·x2

POL(take(x1, x2)) = 2A + 1A·x1 + 0A·x2

POL(uLength(x1, x2)) = -I + 1A·x1 + 1A·x2

POL(and(x1, x2)) = -I + -I·x1 + 0A·x2

POL(isNat(x1)) = 2A + 0A·x1

POL(isNatList(x1)) = -I + 0A·x1

POL(tt) = 2A

POL(uTake1(x1)) = -I + 0A·x1

POL(isNatIList(x1)) = 2A + 0A·x1

POL(uTake2(x1, x2, x3, x4)) = -I + 1A·x1 + 2A·x2 + 0A·x3 + 1A·x4

The following usable rules [FROCOS05] were oriented:

activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X
length(X) → n__length(X)
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
isNat(n__0) → tt
isNatList(n__nil) → tt
and(tt, T) → T
isNat(n__s(N)) → isNat(activate(N))
take(X1, X2) → n__take(X1, X2)
take(0, IL) → uTake1(isNatIList(IL))
isNatIList(n__zeros) → tt
uTake1(tt) → nil
isNatIList(IL) → isNatList(activate(IL))
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNat(n__length(L)) → isNatList(activate(L))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
0n__0
niln__nil

(21) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(22) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(23) YES

(24) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(25) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(N, L)) → ISNATLIST(activate(L)) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__0)) → ISNATLIST(0)
ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(s(x0))
ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)

(26) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__0)) → ISNATLIST(0)
ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(s(x0))
ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(27) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__0)) → ISNATLIST(0) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__0)) → ISNATLIST(n__0)

(28) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(s(x0))
ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__0)) → ISNATLIST(n__0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(29) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(30) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(s(x0))
ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(31) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(s(x0)) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(n__s(x0))

(32) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__s(x0))) → ISNATLIST(n__s(x0))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(33) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(35) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(zeros) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__zeros)

(36) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__zeros)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(37) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(38) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(39) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(cons(x0, x1)) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))

(40) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil)
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(41) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(nil) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(n__nil)

(42) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))
ISNATLIST(n__cons(y0, n__nil)) → ISNATLIST(n__nil)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(43) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(45) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(0, n__zeros)) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(n__0, n__zeros))

(46) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(47) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(cons(n__0, n__zeros)) at position [0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

(48) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(49) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ISNATLIST(n__cons(y0, n__length(x0))) → ISNATLIST(length(x0))
ISNATLIST(n__cons(y0, x0)) → ISNATLIST(x0)
ISNATLIST(n__cons(y0, n__cons(x0, x1))) → ISNATLIST(n__cons(x0, x1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ISNATLIST(x1) ) = 2x1 + 2


POL( length(x1) ) = 2x1


POL( cons(x1, x2) ) = x2 + 1


POL( uLength(x1, x2) ) = max{0, 2x1 + x2 - 2}


POL( and(x1, x2) ) = max{0, x1 + x2 - 1}


POL( isNat(x1) ) = 1


POL( isNatList(x1) ) = 1


POL( activate(x1) ) = 2x1 + 2


POL( n__length(x1) ) = 2x1


POL( take(x1, x2) ) = 1


POL( 0 ) = 0


POL( uTake1(x1) ) = x1


POL( isNatIList(x1) ) = 1


POL( s(x1) ) = 0


POL( uTake2(x1, ..., x4) ) = 1


POL( n__take(x1, x2) ) = max{0, -2}


POL( n__cons(x1, x2) ) = x2 + 1


POL( n__0 ) = 0


POL( tt ) = 1


POL( n__s(x1) ) = max{0, -1}


POL( n__zeros ) = 0


POL( zeros ) = 1


POL( n__nil ) = 0


POL( nil ) = 0



The following usable rules [FROCOS05] were oriented:

length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
length(X) → n__length(X)
take(0, IL) → uTake1(isNatIList(IL))
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
take(X1, X2) → n__take(X1, X2)
0n__0
activate(n__length(X)) → length(X)
isNat(n__0) → tt
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(X) → X
isNatList(n__nil) → tt
and(tt, T) → T
isNat(n__s(N)) → isNat(activate(N))
activate(n__take(X1, X2)) → take(X1, X2)
isNatIList(n__zeros) → tt
uTake1(tt) → nil
isNatIList(IL) → isNatList(activate(IL))
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNat(n__length(L)) → isNatList(activate(L))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
niln__nil

(50) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(51) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(52) Complex Obligation (AND)

(53) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(54) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(55) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(56) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(57) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros))
ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(58) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(0, n__zeros)) at position [0,0] we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

(59) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(60) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(61) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

R is empty.
The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(62) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

0

(63) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(64) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule ISNATLIST(n__cons(y0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros)) we obtained the following new rules [LPAR04]:

ISNATLIST(n__cons(n__0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

(65) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(n__0, n__zeros)) → ISNATLIST(n__cons(n__0, n__zeros))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(66) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = ISNATLIST(n__cons(n__0, n__zeros)) evaluates to t =ISNATLIST(n__cons(n__0, n__zeros))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [ ]
  • Semiunifier: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from ISNATLIST(n__cons(n__0, n__zeros)) to ISNATLIST(n__cons(n__0, n__zeros)).



(67) NO

(68) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATLIST(n__cons(y0, n__take(x0, x1))) → ISNATLIST(take(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(69) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(70) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(N, IL)) → ISNATILIST(activate(IL)) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__0)) → ISNATILIST(0)
ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(s(x0))
ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)

(71) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__0)) → ISNATILIST(0)
ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(s(x0))
ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(72) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__0)) → ISNATILIST(0) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__0)) → ISNATILIST(n__0)

(73) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(s(x0))
ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__0)) → ISNATILIST(n__0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(74) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(75) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(s(x0))
ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(76) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(s(x0)) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(n__s(x0))

(77) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__s(x0))) → ISNATILIST(n__s(x0))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(78) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(79) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(80) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(zeros) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__zeros)

(81) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__zeros)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(82) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(83) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(84) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(cons(x0, x1)) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))

(85) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil)
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(86) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(nil) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(n__nil)

(87) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))
ISNATILIST(n__cons(y0, n__nil)) → ISNATILIST(n__nil)

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(88) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(89) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(90) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(0, n__zeros)) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(n__0, n__zeros))

(91) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(92) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(cons(n__0, n__zeros)) at position [0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

(93) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(94) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


ISNATILIST(n__cons(y0, n__length(x0))) → ISNATILIST(length(x0))
ISNATILIST(n__cons(y0, x0)) → ISNATILIST(x0)
ISNATILIST(n__cons(y0, n__cons(x0, x1))) → ISNATILIST(n__cons(x0, x1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( ISNATILIST(x1) ) = 2x1 + 2


POL( length(x1) ) = 2x1


POL( cons(x1, x2) ) = x2 + 1


POL( uLength(x1, x2) ) = max{0, 2x1 + x2 - 2}


POL( and(x1, x2) ) = max{0, x1 + x2 - 1}


POL( isNat(x1) ) = 1


POL( isNatList(x1) ) = 1


POL( activate(x1) ) = 2x1 + 2


POL( n__length(x1) ) = 2x1


POL( take(x1, x2) ) = 1


POL( 0 ) = 0


POL( uTake1(x1) ) = x1


POL( isNatIList(x1) ) = 1


POL( s(x1) ) = 0


POL( uTake2(x1, ..., x4) ) = 1


POL( n__take(x1, x2) ) = max{0, -2}


POL( n__cons(x1, x2) ) = x2 + 1


POL( n__0 ) = 0


POL( tt ) = 1


POL( n__s(x1) ) = max{0, -1}


POL( n__zeros ) = 0


POL( zeros ) = 1


POL( n__nil ) = 0


POL( nil ) = 0



The following usable rules [FROCOS05] were oriented:

length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
length(X) → n__length(X)
take(0, IL) → uTake1(isNatIList(IL))
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
take(X1, X2) → n__take(X1, X2)
0n__0
activate(n__length(X)) → length(X)
isNat(n__0) → tt
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(X) → X
isNatList(n__nil) → tt
and(tt, T) → T
isNat(n__s(N)) → isNat(activate(N))
activate(n__take(X1, X2)) → take(X1, X2)
isNatIList(n__zeros) → tt
uTake1(tt) → nil
isNatIList(IL) → isNatList(activate(IL))
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNat(n__length(L)) → isNatList(activate(L))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
cons(X1, X2) → n__cons(X1, X2)
uLength(tt, L) → s(length(activate(L)))
s(X) → n__s(X)
zeroscons(0, n__zeros)
zerosn__zeros
niln__nil

(95) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(96) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs.

(97) Complex Obligation (AND)

(98) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(99) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(100) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(101) MNOCProof (EQUIVALENT transformation)

We use the modular non-overlap check [LPAR04] to enlarge Q to all left-hand sides of R.

(102) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros))
ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(103) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(0, n__zeros)) at position [0,0] we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

(104) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

The TRS R consists of the following rules:

0n__0

The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(105) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(106) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

R is empty.
The set Q consists of the following terms:

0

We have to consider all minimal (P,Q,R)-chains.

(107) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

0

(108) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(109) Instantiation (EQUIVALENT transformation)

By instantiating [LPAR04] the rule ISNATILIST(n__cons(y0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros)) we obtained the following new rules [LPAR04]:

ISNATILIST(n__cons(n__0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

(110) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(n__0, n__zeros)) → ISNATILIST(n__cons(n__0, n__zeros))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(111) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ISNATILIST(n__cons(y0, n__take(x0, x1))) → ISNATILIST(take(x0, x1))

The TRS R consists of the following rules:

and(tt, T) → T
isNatIList(IL) → isNatList(activate(IL))
isNat(n__0) → tt
isNat(n__s(N)) → isNat(activate(N))
isNat(n__length(L)) → isNatList(activate(L))
isNatIList(n__zeros) → tt
isNatIList(n__cons(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
isNatList(n__nil) → tt
isNatList(n__cons(N, L)) → and(isNat(activate(N)), isNatList(activate(L)))
isNatList(n__take(N, IL)) → and(isNat(activate(N)), isNatIList(activate(IL)))
zeroscons(0, n__zeros)
take(0, IL) → uTake1(isNatIList(IL))
uTake1(tt) → nil
take(s(M), cons(N, IL)) → uTake2(and(isNat(M), and(isNat(N), isNatIList(activate(IL)))), M, N, activate(IL))
uTake2(tt, M, N, IL) → cons(activate(N), n__take(activate(M), activate(IL)))
length(cons(N, L)) → uLength(and(isNat(N), isNatList(activate(L))), activate(L))
uLength(tt, L) → s(length(activate(L)))
0n__0
s(X) → n__s(X)
length(X) → n__length(X)
zerosn__zeros
cons(X1, X2) → n__cons(X1, X2)
niln__nil
take(X1, X2) → n__take(X1, X2)
activate(n__0) → 0
activate(n__s(X)) → s(X)
activate(n__length(X)) → length(X)
activate(n__zeros) → zeros
activate(n__cons(X1, X2)) → cons(X1, X2)
activate(n__nil) → nil
activate(n__take(X1, X2)) → take(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.